<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>ELUUP·百度地图爬虫工具</title>
    
    <script src="http://api.map.baidu.com/api?v=2.0&ak=kDhCLoCIiqfgHi9UD7R2CpfR" type="text/javascript" ></script>
    <script src="./js/jquery-1.8.2.min.js" type="text/javascript" ></script>
    <script src="./js/JSON/json2.js" type="text/javascript" ></script>
    <script src="./js/map/Heatmap.js" type="text/javascript" ></script>
    
    <style>
    html {font-size:11px;font-family:arial;}
    .group {background-color:#333;color:#fff;}
    .city {text-indent:10px;background-color:#ccc;}
    .area {text-indent:20px;}
    #review {border:1px solid #ccc;background-color:#f2f2f2;padding:10px;margin-top:10px;height:400px;overflow:auto;}
    select, input {margin-right:10px;}
    </style>
</head>
<body>
<h2>ELUUP·百度地图爬虫工具</h2>
<p id="type">
	城市 <select id="city"></select>
	行业 <select id="industry"></select>
	区域坐标 <select id="geo"></select>
	循环抓取：
	<label><input type="checkbox" value="city" />城市</label>
	<label><input type="checkbox" value="industry" />行业</label>
	<label><input type="checkbox" value="geo" />区域坐标</label>
</p>
<p>
	<label>百度AK <input value="E2b5216d09039d90a4a559de89d4a224" id="key" size="30" /></label>
	<select id="map_ak">
		<option value="dASz7ubuSpHidP1oQWKuAK3q">链家 : dASz7ubuSpHidP1oQWKuAK3q</option>
		<option value="E2b5216d09039d90a4a559de89d4a224">中原 : E2b5216d09039d90a4a559de89d4a224</option>
		<option value="63c4ca91e854d14a9cbdd8f7cf663071">安居客 : 63c4ca91e854d14a9cbdd8f7cf663071</option>
		<option value="D5b939310cda4811e6587c8a535e1edc">爱屋吉屋 : D5b939310cda4811e6587c8a535e1edc</option>
	<!-- 
	https://www.iwjw.com/houseMarkByLevel.action?lngF=116.429948&lngT=116.451076&latF=39.930512&latT=39.936875&p=12438&ht=2&zoom=17&_=1478486017281
	https://www.iwjw.com/getMapListById.action?g=3&p=12438&ht=2&code=lN5zuOipEeY&_=1478486017285
	-->
		<option value="3a345e5b8b56a7f80605cd95d64634a8">房天下 : 3a345e5b8b56a7f80605cd95d64634a8</option>
		<option value="Y1kG709UBP4L0ac6SvTjxnm7">jiwu吉屋 : Y1kG709UBP4L0ac6SvTjxnm7</option>
	</select>
	<button id="map_ak_action">使用</button>
</p>
<p>
<button id="showGeo">显示所有抓取区域</button>
<button id="showBdary" >显示行政区域</button>
<button id="showPolygon" >显示当前抓取区域</button>
<button id="clear" >清理地图</button>
差异区域类型 <select id="diffgeo" ></select>
<button id="showDiffGeo" >显示差异区域</button>
</p>
<p id="c_active">
    <button id="action">API数据抓取开始</button>
    <button id="poi_action">POI数据抓取开始</button>
    <button id="local_action">Local数据抓取开始</button>
    <button id="stop">停止</button>
</p>

<div style="width: 800px; height: 700px; border: 1px solid gray; float: left;" id="container"></div>
<div style="width: 650px; height: 700px; float: left; margin: 0 0 0 10px;">
	<p>
		<input id="word" autocomplete="off" placeholder="搜地点、查公交、找路线" value="小区" type="text" size="60"/>
		<button id="word_action">地图查询</button>
	</p>
	<p>
		摩卡托坐标X:<input type="text" value="12059034.69" id="mctX" />
		经纬度lng:百度坐标X:<input type="text" value="" id="pointX" />
	</p>
	<p>
		摩卡托坐标Y:<input type="text" value="2590880.82" id="mctY" />
		经纬度lat:百度坐标Y:<input type="text" value="" id="pointY" />
	</p>
	<p id="entertaiment"></p>
	<p>
		<input id="mctGeo" style="width: 240px; height: 130px; font-size: 30px;" type="button" value="MCT反地址解析" />
		<input id="bdGeo" style="width: 240px; height: 130px; font-size: 30px;" type="button" value="百度坐标反查" />
	</p>
    <div id="review"></div>
</div>
<div style="clear:both">
    <p>欢迎大家共享及优化 <a href="http://www.eluup.com">www.eluup.com</a></p>
</div>
<script>
    var $local_action = $("#local_action");
    var $poi_action = $("#poi_action");
    var $diffgeo = $("#diffgeo");
    var $geo = $("#geo"),$type = $("#type"), $city = $("#city"), $industry = $("#industry"), $action = $("#action");
    var $stop = $("#stop"),$review = $("#review"), begin = true, number = 0, statusPage = 0;
    var key = $("#key").val();
    $("#key").blur(function(){
    	key = $("#key").val();
    });
    var hash_points = [];
    var cell = [116.455888,39.899355];
    var title = '坐标及其点击量';
    var grade = 10;
    var map;// 百度地图对象
    var polygon;// 抓取区域对象
    var gc = {};
    var mOption = {
        poiRadius: 750,
        //半径为1000米内的POI,默认100米  
        numPois: 20 //列举出50个POI,默认10个  
    }
    var local = {};
</script>
<script>
$(function(){
	$("#map_ak_action").click(function(){
		$("#key").val($("#map_ak").val());
	});
	var _init = function (){
    	// 初始化 -- start ----
    	map = new BMap.Map("container");          // 创建地图实例
        // 初始化地图，设置中心点坐标和地图级别
        map.centerAndZoom(new BMap.Point('116.418261','39.921984' ), 10);             
        map.enableScrollWheelZoom(); // 允许滚轮缩放
        map.addControl(new BMap.NavigationControl());
        map.addControl(new BMap.ScaleControl()); // 启用比例尺。            
        gc = new BMap.Geocoder();
        local = new BMap.LocalSearch(map, {
    		onSearchComplete : function (results){
    			cb_local_robot(results.wr, 0, local_robot);
    		},
    		//renderOptions:{map: map},
    		pageCapacity:100   //每页条数
    	});
        // 初始化 -- end ----
	}
	_init();
	
	$("#word_action").click(function(){
		// 百度地图API功能
		var local = new BMap.LocalSearch(map, {
			renderOptions: {map: map, panel: "review"}
		});
		local.search($("#word").val());
	});
	
    // 设置热门区域，热点地图
    function setHeatmap(title,node,data,max_value) {
    	var elem = document.createElement('canvas');
	    var isSupportCanvas = !!(elem.getContext && elem.getContext('2d'));
	    if(!isSupportCanvas){
	    	alert('目前只支持有canvas支持的浏览器~')
	    }
	    heatmapOverlay = new BMapLib.HeatmapOverlay({"radius":20});
		map.addOverlay(heatmapOverlay);
		heatmapOverlay.setDataSet({data:data,max:max_value});
		heatmapOverlay.show();
	}
	// 显示行政区域
	function getBoundary(){       
		var bdary = new BMap.Boundary();
		var city_text = $city.find("option:selected").text();
		bdary.get(city_text, function(rs){       //获取行政区域
			var count = rs.boundaries.length; //行政区域的点有多少个
			if (count === 0) {
				alert('未能获取当前输入行政区域');
				return ;
			}
          	var pointArray = [];
			for (var i = 0; i < count; i++) {
				var ply = new BMap.Polygon(rs.boundaries[i], {strokeWeight: 2, strokeColor: "#aa0000"}); //建立多边形覆盖物
				map.addOverlay(ply);  //添加覆盖物
				pointArray = pointArray.concat(ply.getPath());
			}    
			map.setViewport(pointArray);    //调整视野  
		});   
	}
	function getPolygon() {
		var p = $("#geo").val().split(",");
		$("#pointX").val(p[1]);
	    $("#pointY").val(p[0]);
		var pStart = new BMap.Point(p[1],p[0]);
		var pEnd = new BMap.Point(p[3],p[2]);

		polygon = new BMap.Polygon([
    			new BMap.Point(pStart.lng,pStart.lat),
    			new BMap.Point(pEnd.lng,pStart.lat),
    			new BMap.Point(pEnd.lng,pEnd.lat),
    			new BMap.Point(pStart.lng,pEnd.lat)
			], {strokeColor:"blue", strokeWeight:6, strokeOpacity:0.5}
		);
		map.addOverlay(polygon);
	}
	$("#clear").click(function(){
    	map.clearOverlays();        //清除地图覆盖物
	});
	
	$("#showGeo").click(function (){
		setHeatmap(title,"container" ,hash_points, 10);
	});
	
	$("#showDiffGeo").click(function (){
		$.ajax({
			beforeSend :function(xmlHttp){ 
		        xmlHttp.setRequestHeader("If-Modified-Since","0"); 
		        xmlHttp.setRequestHeader("Cache-Control","no-cache");
		     },
			cache:false, 
	    	async:true,
	    	url : "diff.php?type="+$diffgeo.val(),
	    	type : "POST",
	    	dataType : "json",
	    	success: function(data) {
        		var hash_diff_points = [];
	    		for (var i in data) {
	        		var zz = i.split(",");
	        		hash_diff_points.push({"lng":zz[0],"lat":zz[1],"count":1});
	    		}
	    		setHeatmap(title,"container" ,hash_diff_points, 10);		
	    	}
	    });
	});


	map.addEventListener("click", function(e) {
		map.clearOverlays();
	    $review.html("");
	    var pt = e.point;　
	    $("#pointX").val(pt.lng);
	    $("#pointY").val(pt.lat);
	    
	    var projection1 = this.getMapType().getProjection();
	    var worldCoordinate = projection1.lngLatToPoint(pt);
	    $("#mctX").val(worldCoordinate.x);
	    $("#mctY").val(worldCoordinate.y);
                
	    gc.getLocation(pt, function(rs) {
            $review.html(rs.addressComponents.province + ", " + rs.addressComponents.city + ", " + rs.addressComponents.district + ", " + rs.addressComponents.street + ", " + rs.addressComponents.streetNumber);
            for (i = 0; i < rs.surroundingPois.length; ++i) {
            	$review.append("<p style='font-size:12px;'>" + (i + 1) + "、" + rs.surroundingPois[i].title + ",地址:" + rs.surroundingPois[i].address + "</p>");
                map.addOverlay( new BMap.Marker(rs.surroundingPois[i].point));
            }
            cb_local_robot(rs.surroundingPois, 0, null);
        }, mOption);
	}); //摩卡托反地址解析  
	
	$("#bdGeo").click(function(){
		map.clearOverlays();
	    $review.html("");
	    var pt = new BMap.Point($("#pointX").val(),$("#pointY").val());　
	    var projection1 = map.getMapType().getProjection();
	    var worldCoordinate = projection1.lngLatToPoint(pt);
	    $("#mctX").val(worldCoordinate.x);
	    $("#mctY").val(worldCoordinate.y);
                
	    gc.getLocation(pt, function(rs) {
            $review.html(rs.addressComponents.province + ", "+ rs.addressComponents.city+", " + rs.addressComponents.district + ", " + rs.addressComponents.street + ", " + rs.addressComponents.streetNumber);
            for (i = 0; i < rs.surroundingPois.length; ++i) {
            	$review.append("<p style='font-size:12px;'>" + (i + 1) + "、" + rs.surroundingPois[i].title + ",地址:" + rs.surroundingPois[i].address + "</p>");
                map.addOverlay( new BMap.Marker(rs.surroundingPois[i].point));
            }
            cb_local_robot(rs.surroundingPois, 0, null);
        }, mOption);
	});
	$("#mctGeo").click(function (){
		map.clearOverlays();
	    $review.html("");
	    var mctXY =  new BMap.Pixel($("#mctX").val()*1, $("#mctY").val()*1);
	    var projection2 = map.getMapType().getProjection();
	    var LngLat = projection2.pointToLngLat(mctXY);
	    $("#pointX").val(LngLat.lng);
	    $("#pointY").val(LngLat.lat);

        gc.getLocation(LngLat, function(rs) {
            $review.html(rs.addressComponents.province + ", " + rs.addressComponents.city + ", " + rs.addressComponents.district + ", " + rs.addressComponents.street + ", " + rs.addressComponents.streetNumber);
            for (i = 0; i < rs.surroundingPois.length; ++i) {
            	$review.append("<p style='font-size:12px;'>" + (i + 1) + "、" + rs.surroundingPois[i].title + ",地址:" + rs.surroundingPois[i].address + "</p>");
                map.addOverlay( new BMap.Marker(rs.surroundingPois[i].point));
            }
            cb_local_robot(rs.surroundingPois, 0, null);
        }, mOption);
	    
	});
	
	$("#showBdary").click(function (){
		getBoundary();
	});
	$("#showPolygon").click(function (){
		getPolygon();
	});
    
    var poi_robot = function(page) {
    	if (industry == false) {
    		return false;
    	} else {
    		if (begin == false) return false;
    	    var p = $("#geo").val().split(",");
    		var LngLat = new BMap.Point((p[1]*1 + p[3]*1) / 2,(p[0]*1 + p[2]*1) / 2);
	        gc.getLocation(LngLat, function(rs) {
	            cb_local_robot(rs.surroundingPois, 0, poi_robot);
	        }, mOption);
    	}
    }

    var local_robot = function(page) {
    	if (industry == false) {
    		return false;
    	} else {
    	    var p = $("#geo").val().split(",");
    		var pStart = new BMap.Point(p[1],p[0]);
    		var pEnd = new BMap.Point(p[3],p[2]);
    		//自己规定范围
    	    local.searchInBounds("小区", new BMap.Bounds(pStart,pEnd));
    	}
    }
    var cb_local_robot = function(result, page, ajax_callback){
    	if (begin == false) return false;
    	
    	if (result.length < 1) {
            cb_success({"status":"null"}, page, ajax_callback)
            return false;
        }
        
    	var $body = '';
	    for (i = 0; i < result.length; ++i) {
            $body += '{ "create": { "_index": "baidu_poi", "_type": "poi", "_id": "'+result[i].uid+'" }}';
            $body += "\n";
            $body += JSON.stringify(result[i]);
            $body += "\n";
    	}
	    $.ajax({
    		beforeSend :function(xmlHttp){ 
    	        xmlHttp.setRequestHeader("If-Modified-Since","0"); 
    	        xmlHttp.setRequestHeader("Cache-Control","no-cache");
    	     },
    		cache:false, 
        	async:true,
        	url : "esproxy.php?/_bulk",
        	type : "POST",
        	dataType : "json",
        	data: $body,
        	success: function (res){
	        	if (ajax_callback != null) {
        			cb_success(res, page, ajax_callback)
	        	}
			}
        });
    }
    
    var robot = function(page) {
    	if (industry == false) {
    		return false;
    	}else{
    		if (begin == false) return false;
    		industry = $industry.find("option:selected").text();
            city = $city.find("option:selected").text();
            industryID = $industry.find("option:selected").val();
            cityID = $city.find("option:selected").val();
            geo = $geo.find("option:selected").val();

    		$.ajax({
    			beforeSend :function(xmlHttp){ 
    		        xmlHttp.setRequestHeader("If-Modified-Since","0"); 
    		        xmlHttp.setRequestHeader("Cache-Control","no-cache");
    		    },
    			cache:false, 
    			async:true,
    			url : "robot.php",
    			data : {"industry":industry,"city":city,"page":page,"industryID":industryID,"cityID":cityID,"key":key,"geo":geo},
    			type : "GET",
    			dataType : "json",
    			success : function (res){
        			cb_success(res, page, robot)
    			}
    		});
    		number++;
    	}
    }
    var cb_success = function (res, page, cb_robot) {
		var d = res.status;
		var $this = $industry.find("option:selected").text();
		var $next = $industry.find("option:selected").next().text();
		
		var $geothis = $geo.find("option:selected").text();
		var $geonext = $geo.find("option:selected").next().text();
		
		$review.append(
		    "<div class=\"msg"+number+"\">当前page："+page
			+" 行业参数："+$this+" 行业下一个参数："+$next
			+" 区域参数："+$geothis+" 区域下一个参数："+$geonext
			+"</div>"
		);
		$review.animate({scrollTop:($(".msg"+number+"").offset().top * 1)}, 0);
	    if ((page+1) % 10 == 1) {
	    	$review.find("div").remove();
	    }
		
		/*if (industry == $industry.find("option:last").text()) {
			statusPage = 0;
			$review.find("div").remove();
			var citySetting = $city.find("option:selected").next();
			var industrySetting = $industry.find(":first");
			//console.log($city.find("option:selected").next().text())
			citySetting.attr("selected",true);
			industrySetting.attr("selected",true);
			setCookie("industry",industrySetting.val());
			setCookie("city",citySetting.val());
			robot($industry.find("option:selected").next().text(),$city.find("option:selected").text(),0,$industry.find("option:selected").next().val(),$city.find("option:selected").val());
			return false;
		}*/

		
		if (d == "302") {
			$review.append(
			    "<div color=red style=\"color: red;font-size: 24px\">"
			    +res.data.message
				+"</div>"
			);
			return false;
		}else if (d == "ok") {
			statusPage++;
			setCookie("industry",industryID);
			setCookie("city",cityID);
			setCookie("geo",geo);
			cb_robot(statusPage);
			return false;
		}else if (d == "null") {
			statusPage = 0;

			var types = [];
            $type.find('input:checked').each(function (i) {
                types.push($(this).val());
            })
            if (types=='') {
                return false;
            }
            if (-1 != types.join(',').indexOf('geo')) {
				var geoSetting = $geo.find("option:selected").next();
				if ($geo.find("option:selected").next().text() =='') {
					var industrySetting = $industry.find("option:selected").next();
					if ($industry.find("option:selected").next().text()=='') {
						return false;
						// industrySetting = $industry.find(":first");
					}
					industrySetting.attr("selected",true);
					setCookie("industry",industrySetting.val());
					geoSetting = $geo.find(":first");
				}
				$review.find("div").remove();
				geoSetting.attr("selected",true);
				setCookie("geo",geoSetting.val());
            }
            if (-1 != types.join(',').indexOf('industry')) {
				var industrySetting = $industry.find("option:selected").next();
				if ($industry.find("option:selected").next().text()=='') {
					return false;
				}
				$review.find("div").remove();
				industrySetting.attr("selected",true);
				setCookie("industry",industrySetting.val());
            }
			
            cb_robot(page);
			return false;
		}else{
			statusPage = 0;
			$review.append("<br />=========<br />==== 抓取失败. ====== <br />===============");
			return false;
		}
	}
	
    
    $local_action.on("click",function() {
    	if ($("#key").val() == "") {
    		$review.html("Baidu AK不能为空。\
    	    		更多详情请登录百度Map api平台 http://lbsyun.baidu.com/apiconsole/key，创建AK拷贝至此。");
    		return false;
    	}
    	$review.text("爬爬爬爬，爬虫中...");
    	begin = true;
    	local_robot();
    });
    $poi_action.on("click",function() {
    	if ($("#key").val() == "") {
    		$review.html("Baidu AK不能为空。\
    	    		更多详情请登录百度Map api平台 http://lbsyun.baidu.com/apiconsole/key，创建AK拷贝至此。");
    		return false;
    	}
    	$review.text("爬爬爬爬，爬虫中...");
    	begin = true;
    	poi_robot();
    });
    
    
    $stop.on("click",function() {
    	begin = false;
    	robot(false);
    });
    
    $action.on("click",function() {
    	if ($("#key").val() == "") {
    		$review.html("Baidu AK不能为空。\
    	    		更多详情请登录百度Map api平台 http://lbsyun.baidu.com/apiconsole/key，创建AK拷贝至此。");
    		return false;
    	}
    	$review.text("爬爬爬爬，爬虫中...");
    	begin = true;
    	robot($industry.find("option:selected").text(),$city.find("option:selected").text(),0,$industry.val(),$city.val(),key, $geo.val());
    });
});
</script>
<script>
$(function(){
	$.ajax({
    	beforeSend :function(xmlHttp){ 
	        xmlHttp.setRequestHeader("If-Modified-Since","0"); 
	        xmlHttp.setRequestHeader("Cache-Control","no-cache");
	     },
		cache:false, 
    	async:true,
    	url : "geo.php",
    	type : "POST",
    	dataType : "json",
    	success: function(data) {
    		var geo = '';
    		for (var i in data) {
        		var zz = i.split(",");
    			var val = '';
    			val += data[i].left_down.y + "," + data[i].left_down.x + ",";
    			val += data[i].right_top.y + "," + data[i].right_top.x;
    			var selected = getCookie("geo") == val ? " selected=\"selected\"" : "";
        		geo += "<option class=\"city\" value=\""+val+"\""+selected+">"+i+"</option>";
        		hash_points.push({"lng":zz[0],"lat":zz[1],"count":1});
    		}
    		
    		$geo.html(geo);
    	}
    });
    $.ajax({
    	async:true,
    	url : "diff.php",
    	type : "POST",
    	dataType : "json",
    	success: function(data) {
    		var diffgeo = '';
    		for (var i in data) {
        		var selected = getCookie("diffgeo") == i ? " selected=\"selected\"" : "";
        		diffgeo += "<option class=\"city\" value=\""+i+"\""+selected+">"+data[i]+"</option>";
    		}
    		$diffgeo.html(diffgeo);
    	}
    });
    $.ajax({
    	async:true,
    	url : "data.txt",
    	type : "POST",
    	dataType : "json",
    	success: function(data) {
    		var province = new Array(), city = new Array(), industry = new Array(), d = data.province, s = data.industry;
    		for (i in s) {
    			var selected = getCookie("industry") == s[i].value ? " selected=\"selected\"" : "";
    			industry += "<option class=\"group\" value=\""+s[i].value+"\""+selected+">"+s[i].name+"</option>";
    			for (j in s[i].data) {
    				if (s[i].data[j].name != s[i].name || s[i].data[j].name != "其他") {
    					var selected = getCookie("industry") == s[i].data[j].value ? " selected=\"selected\"" : "";
    					industry += "<option class=\"city\" value=\""+s[i].data[j].value+"\""+selected+">"+s[i].data[j].name+"</option>";
    				}
    				for (k in s[i].data[j].data) {
    					if (s[i].data[j].data[k].name != s[i].data[j].name || s[i].data[j].data[k].name != "其他") {
    						var selected = getCookie("industry") == s[i].data[j].data[k].value ? " selected=\"selected\"" : "";
    						industry += "<option class=\"area\" value=\""+s[i].data[j].data[k].value+"\""+selected+">"+s[i].data[j].data[k].name+"</option>";
    					}
    				}
    			}
    		}
    		
    		$industry.html(industry);
    		
    		for (i in d) {
    			var selected = getCookie("city") == d[i].value ? " selected=\"selected\"" : "";
    			city += "<option class=\"group\" value=\""+d[i].value+"\""+selected+">"+d[i].name+"</option>";
    			for (j in d[i].data) {
    				if (d[i].data[j].name != d[i].name) {
    					var selected = getCookie("city") == d[i].data[j].value ? " selected=\"selected\"" : "";
    					city += "<option class=\"city\" value=\""+d[i].data[j].value+"\""+selected+">"+d[i].data[j].name+"</option>";
    				}
    				for (k in d[i].data[j].data) {
    					if (d[i].data[j].data[k].name != d[i].data[j].name) {
    						var selected = getCookie("city") == +d[i].data[j].data[k].value ? " selected=\"selected\"" : "";
    						city += "<option class=\"area\" value=\""+d[i].data[j].data[k].value+"\""+selected+">"+d[i].data[j].data[k].name+"</option>";
    					}
    				}
    			}
    		}
    		
    		$city.html(city);
    	}
    });
});
</script>

<script>
function getCookie(c_name) {
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=")
		if (c_start!=-1) { 
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		}
	}
	return "";
}

function setCookie(name,value) {
	var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    if(expires!=null) {
        var LargeExpDate = new Date ();
        LargeExpDate.setTime(LargeExpDate.getTime() + (expires*1000*3600*24));        
    }
    document.cookie = name + "=" + escape (value)+((expires == null) ? "" : ("; expires=" +LargeExpDate.toGMTString())); 
}
</script>


</body>
</html>